using System.Collections.Generic;
using UnityEngine;

public class SelfMovingObjectManager : MonoBehaviour
{
	public static SelfMovingObjectManager instance;

	public Dictionary<int, Transform> platform = new Dictionary<int, Transform>();

	private void Awake()
	{
		instance = this;
	}

	public void Add(int key, Transform transform)
	{
		if (!platform.ContainsKey(key))
		{
			platform.Add(key, transform);
			return;
		}
		BCWDebug.LogError("key " + key + " exists |  " + transform.gameObject.name);
	}

	public Transform Get(int key)
	{
		return platform[key];
	}

	private void OnDestroy()
	{
		instance = null;
	}
}
